home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 16
/
Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso
/
Aminet
/
comm
/
cnet
/
fpcnet.lha
/
fpfiles
/
fpcnet
/
FPCNET
next >
Wrap
Text File
|
1996-07-12
|
3KB
|
41 lines
/**************************************************************************^
$VER: FPCNetText Downloader, v1.00 (10-Jul-96) by Dotoran!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch
a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
bcost=50 /* DL byte cost of file in percent (size of file * bcost) */
fcost=0 /* DL file cost of file in files */
schat=0 /* 0=Available at all prompts, 1=only available in Sysop Chat */
gu 1209644;nu=result;gu 2407246;max=result;if nu=max then do
tr "n1c6You have c9NO c6room in your ceSelect Bufferc6!";exit;end
sch=bbsline(1,931);getwhere;if schat & result~=sch then do;gu 1302246
tr 'n1c6Unknown command cf"cb'result'cf" c6... enter ca? c6for quick help.';exit;end
gu 2107333;tset=result /* Use Multiple Text Sets: 0=No, 1=User, 2=Port */
se "n1cbMark c6"word("the some",(tset>0)+1)" ceBBSTEXTc6/ceBBSMENU c6files for cadownload c7[c9Noc7]c6? "
gc;if result~="Y" then do;tr "c9Noc6.";exit;end;else tr "caYesc6!n1"
select;when tset=1 then do;bbstm=BMTXT(23);do a=0 to bbstm;tr "cf"right(a,3)"cb. ca"bmt.a;end
se "n1c6Enter the ceBBSTEXTc6/ceBBSMENU cb# c6you want to cddownloadc9: c7[cb0c6-cb"bbstm"c7]c6? cbL1305640 #0}I16452 2}"
gu 70;an=result;if ~datatype(an,"W")|an<0|an>bbstm then exit;if an=0 then an="";end
when tset=2 then do;gu 23;an=result;if an=0 then an="";end;otherwise an="";end
bbsidentify name;bbs=result;gu 2307314;tf=left(result,2)"_CNET"an".LHA"
gu 39;result="mail:users/"result"/";tpf=result||tf;call delete(tpf)
se "n1cdPacking c6the ceBBSTEXTcb"an"c7/ceBBSMENUcb"an"c6... cfPlease waitc6..."
address command "lha -I -b64 -m -Qw -Qo a "tpf" CNET:BBSTEXT"an" CNET:BBSMENU"an;address command "filenote "tpf' "'bbs" BBSTEXT"an"/BBSMENU"an'"'
if SELFILE(tpf,bcost,fcost,2) then;tr 'b1cbDonen2c6The file was added to your ceSelect Buffer c6as cf"cd'tf'cf"c6...';exit
SELFILE:;arg np,bco,fco,ki;gu 1209644;nu=result;gu 2407246;if nu=result then return 0
pa=left(np,max(lastpos(":",np),lastpos("/",np)));na=substr(np,length(pa)+1);si=word(statef(np),2)
sh=x2c(d2x(si,8))left(na,32,"00"x)left(pa,96,"00"x)copies("00"x,7)
sh=sh||x2c(d2x(ki,2))x2c(d2x(si*bco%100,8))x2c(d2x(fco,4))copies("00"x,6)copies("FF"x,4)
getcarrier;if result~="TRUE" then exit;gu 1401978;call export(x2c(d2x(result+nu*156,8)),sh)
setobject nu+1;putuser 1209644;return 1
BMTXT:;b=ARG(1)*2;gu 2401064;t=import(x2c(d2x(result,8)),220);parse var t 13 p +4 =b+21 s +2 =b+121 l +2;c=0
do a=c2d(s) to (c2d(s)+c2d(l)-1);m=import(import(offset(p,4*a),4),512);parse var m t"00"x;bmt.c=translate(t,"\{","");c=c+1;end;return c-1
BBSLINE:;arg ty,li;gu 1402018+(ty*4);ln=import(import(offset(x2c(d2x(result,8)),(li-1)*4),4),1024);parse var ln ln'00'x .;return ln
SYNTAX:;ERROR:;IOERR:;e1=' Error: 'rc' ('errortext(rc)')';e2=' Line: 'left(sigl,4)'File:';gu 1311992;a=result;gu 1311960;b=result;c='"'a||b'"';e2=e2' 'c
tr e1;tr e2;logentry e1;logentry e2;e=sourceline(sigl);do while e~='';e3='Source: 'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/